from BinaryTree import BinaryTree
from analysis.generator import set_random_leaves, generate_tree


def print_tree(node, level=0, prefix="Root: "):
    if node is not None:
        print(' ' * (level * 4) + prefix + str(node.value))
        if node.left is not None or node.right is not None:
            print_tree(node.left, level + 1, "L--- ")
            print_tree(node.right, level + 1, "R--- ")
